package learner.dtw;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

import learner.Pattern;
import learner.PatternModel;

public class DTWModel implements PatternModel{

	/**
	 * 
	 */
	//deze serial nb is overgenomen uit een error message
	private static final long serialVersionUID = 6136881881304905725L;
	private Double threshold;
	
	public DTWModel(Double threshold){
		this.threshold=threshold;
	}
	
	public void writeToFile(String fileName) {
		ObjectOutputStream out;
		try {
			out = new ObjectOutputStream(new FileOutputStream(fileName));
			out.writeObject(this);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

	@Override
	public double getClassifactionScore(Pattern pattern) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	public Double getThreshold() {
		return threshold;
	}

	@Override
	public String getModelTypeName() {
		return "dtwmodel";
	}

}
